package mysql

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ SymbolUsModel = (*customSymbolUsModel)(nil)

type (
	// SymbolUsModel is an interface to be customized, add more methods here,
	// and implement the added methods in customSymbolUsModel.
	SymbolUsModel interface {
		symbolUsModel
		withSession(session sqlx.Session) SymbolUsModel
	}

	customSymbolUsModel struct {
		*defaultSymbolUsModel
	}
)

// NewSymbolUsModel returns a model for the database table.
func NewSymbolUsModel(conn sqlx.SqlConn) SymbolUsModel {
	return &customSymbolUsModel{
		defaultSymbolUsModel: newSymbolUsModel(conn),
	}
}

func (m *customSymbolUsModel) withSession(session sqlx.Session) SymbolUsModel {
	return NewSymbolUsModel(sqlx.NewSqlConnFromSession(session))
}
